
C = 20
K = 10
count = integer(K)
for (k in 1:K) {
  count[k] = CountBranchedNcK(C,k)
}

N = 20*10
traditional = integer(K)
for (k in 1:K) {
  traditional[k] = choose(N,k)
}

# plot(1:K,log(count),xlab="K",ylab="N") #,type="l",col="black")
# lines(1:K,log(traditional),col="red") #xlab="",ylab="")
plot(1:K,log(traditional),xlab="K",ylab="log(# of Combinations)") #xlab="",ylab="")
lines(1:K,log(count),col="red") #,type="l",col="black")
title(main="N-Choose-K \nTraditional vs Branched")

# count = matrix(integer(C*K),C,K)
# for (c in 1:C) {
#   for (k in 1:c) {
#     count[c,k] = CountBranchedNcK(c,k)
#   }
# }